using System.Linq;
using NUnit.Framework;

namespace Solver
{
	/// <summary>
	/// Discover all the fractions with an unorthodox cancelling method.
	/// </summary>
	public class Problem033 : SelfChecker, IProblem
	{
		public int Id
		{
			get { return 33; }
		}

		public string Solve()
		{
			var numerators = new[] {49, 26, 16, 19};
			var denominators = new[] {98, 65, 64, 95};
			var numerator = numerators.Aggregate(1, (total, cur) => total * cur);
			var denominator = denominators.Aggregate(1, (total, cur) => total * cur);
			return (denominator / numerator).ToString();
		}

		[Test]
		public override void Check()
		{
			Assert.AreEqual("100", Solve());
		}
	}
}